1. Field of the Invention
This invention relates generally to the field of computer interfaces and in particular to a software-based method for controlling a computer interface for a joystick input device.
2. Background Art
To allow computers to communicate and interact with their environment, they are often connected to external devices and signals. Frequently, these external devices and signals are asynchronous to the computer; they do not follow the internal clock of the computer. They are often referred to as real-time devices and signals. Although many computer applications require real-time interaction, one of the most common examples involves the playing of computer games. Games require input from the players, which is often accomplished through the use of joystick input devices. However, a joystick cannot be connected directly to the computer. It must be connected through an interface.
A joystick input device typically provides two analog resistance values representing orthogonal position coordinates. The analog values must be digitized before they can be processed by a digital computer. Analog-to-digital conversion is performed by an analog-to-digital (A/D) converter, which is typically implemented by generating a binary pulse according to a resistance-capacitance (RC) network. Currents through the joystick resistances charge capacitors to a specific voltage, and pulse generators produce a signal dependent upon the time required to reach this voltage. Because software measures the binary in time units pulse dependent on the main clock oscillator in the computer, the analog joystick measurements are dependent upon the processing speed of the computer. As described below, this dependency prevents the joysticks from operating properly with improved computers that have higher clock rates.
In the prior art, a single constant is sometimes used to relate the timing of external events measured in internal clock cycles to standardized units of time. Since computers in which this method is utilized are typically based on a highly stable quartz crystal oscillator, operating at a single frequency for all models of the particular computer, a single constant could adequately relate the internal and external timings.
Another method used in the prior art to relate the timing of external events to the processor clock speed is to add an additional oscillator which operates at a frequency more easily relatable to standard time units. A real-time clock oscillator of this type typically measures the external signals in standard time units, and stores the values in registers which can be read by the computer at a time determined by the main clock oscillator.
Both of these prior art methods have disadvantages. As technology has improved, new models of computers have been introduced with higher frequency oscillators and improved processor configurations. These improvements have increased the clock rates, preventing the use of a single constant to relate the internal timing with standard time units. A prior art attempt to solve this limitation implements selection of a particular constant from a range of constants via DIP switches, but the switches are inaccessible, inconvenient, and often confusing. The use of a separate real-time clock oscillator increases the cost and complexity of the system and requires synchronization circuitry to prevent timing conflicts with the main clock oscillator.
Therefore, it is an object of the present invention to provide an interface which can adapt the internal timing of computers with various clock rates and processor configurations to the real-time environment in which they operate.
It is another object of the present invention to provide a means of software control of the rate adaptation parameters.